<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>心理健康管理</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/table.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/js/health/psychol.js" type="text/javascript"></script>
	<script src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
<div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal;align:left">当前位置：健康管理--心里健康管理</div>
	<form id="surveyQuestion" action="psychol!save.action" method="post">
	<input type="hidden" id="personId" name="personId" value="${personId}" />
	<input type="hidden" id="resultId" name="resultId" value="${resultId}"/>
	<table width="70%" class="noborder">
		<tr>
			<td>调查ID：</td><td><input type="text" size="10" name="resultSurveyId" value="${resultSurveyId}"/></td>
			<td>姓名：</td><td><input type="text" size="10" name="personName" value="${personName}"/></td>
		</tr>
		<tr>
			<td>问卷类别：</td><td><input type="text" size="10" name="surveyType" value="${surveyType}"/></td>
			<td>问卷名称：</td><td><s:select name="surveyId" id="surveyId" style="width:95px" theme="simple" value="%{surveyId}"
									list="surveyList" listKey="key" listValue="value" /></td>
		</tr>
	</table>
	问卷内容<br />
	<s:if test="%{resultId == null}">
	<table id="questions">
	<s:iterator value="surveyQuestions" status="st">
	
	<tr><td>${seqNo}.</td><td>${question}:</td>
		<td><input type="hidden" value="${id}" name="answersId[${st.index}]" /></td>
		<td><s:if test="%{type}"><input type="text" size="10" name="answers[${st.index}]"/></s:if>
			<s:else><s:radio list="%{answers}" listKey="answer" listValue="answer" name="answers[%{#st.index}]" theme="simple" /></s:else>
		</td></tr>
	</s:iterator>
	</table>
	<br />
	<input type="submit" value="提交" />
	<input type="button" onclick="history.back()" value="取消" />
	</s:if><s:else>
	<table>
	<s:iterator value="details" status="st">
	<tr><td>${question.seqNo}.</td><td>${question.question}:</td>
		<td></td>
		<td><s:if test="%{question.type}"><input type="text" size="10" value="${answer}"/></s:if>
			<s:else><s:radio list="%{question.answers}" listKey="answer" listValue="answer" name="answers[%{#st.index}]" value="%{answer}" theme="simple" /></s:else>
		</td></tr>
	</s:iterator>
	</table>
	<br />
	<input type="submit" value="统计" />
	<input type="button" onclick="history.back()" value="取消" />
	</s:else>
	</form>		
</body>
</html>